<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" xmlns:shiro="http://www.pollix.at/thymeleaf/shiro">

<head>
    <meta charset="UTF-8">
    <title>项目列表</title>
    <link rel="stylesheet" href="https://cdn.staticfile.org/twitter-bootstrap/3.3.7/css/bootstrap.min.css">
    <script src="https://cdn.staticfile.org/jquery/2.1.1/jquery.min.js"></script>
    <script src="https://cdn.staticfile.org/twitter-bootstrap/3.3.7/js/bootstrap.min.js"></script>
</head>

<body class="gray-bg">

<nav class="navbar navbar-default" role="navigation">
    <div class="navbar-header">
        <a class="navbar-brand" href="#">API-Manager</a>
    </div>

    <div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1">
        <ul class="nav navbar-nav">
            <li class="active">
                <a href="#">项目列表</a>
            </li>
            <li>
                <a href="#">标签列表</a>
            </li>
        </ul>
        <form class="navbar-form navbar-left" role="search">
            <div class="form-group">
                <input type="text" class="form-control" placeholder="项目名称" />
            </div>
            <div class="form-group">
                <input type="text" class="form-control"  placeholder="项目描述" />
            </div>
            <button type="submit" class="btn btn-default">查询</button>
        </form>
        <ul class="nav navbar-nav navbar-right">
            <li class="dropdown">
                <a href="#" class="dropdown-toggle" data-toggle="dropdown">配置管理<strong class="caret"></strong></a>
                <ul class="dropdown-menu">
                    <li>
                        <a href="#">新建项目</a>
                    </li>
                    <li class="divider">
                    </li>
                    <li>
                        <a href="#">新建标签</a>
                    </li>
                </ul>
            </li>
        </ul>
    </div>

</nav>

<div class="container">


    <div class="col-md-3" th:each="project: ${projectList}">
        <div class="panel panel-primary">
            <div class="panel-heading">
                <h3 class="panel-title" th:text="${project.projectName}"></h3>
            </div>
            <div class="panel-body" th:text="${project.projectDesc}" th:onclick="chooseProjct([[${project.projectId}]])"></div>
        </div>
    </div>

</div>


<script th:inline="javascript">

    function chooseProjct(projectId) {
        alert(projectId);

    }

</script>
</body>


</html>